package com.cml.common.dto.message;

import com.cml.common.constant.MessageType;
import com.cml.common.dto.entity.Message;

/**
 * 姓名：陈茂林
 * 时间：2023/11/6 11:54
 * 描述：
 */
public class ServiceRegisterRequest extends Message {
    private String serviceName;

    private String ip;

    private Integer port;

    private Integer httpPort;

    public Integer getHttpPort() {
        return httpPort;
    }

    public void setHttpPort(Integer httpPort) {
        this.httpPort = httpPort;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }
    public Integer doGetMessageLength() {
        return Message.INTGER_TYPE_LENGTH+serviceName.length()+Message.INTGER_TYPE_LENGTH;
    }

    public Integer doGetMessageType() {
        return MessageType.CLIENT_REQUEST_SERVICE_REGISTER_MESSAGE;
    }
}
